<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <div class="centent_right rightCon">

            <div class="Mtitle">
                <ul>
                    <li class="on"><span>小区列表</span></li>
                    <li style="margin-right:100px;border: 1px solid #EFEFEF;height: 10px;padding: 5px 10px 10px 10px ">
                        <a href="{:U('Set/add_estate')}">新增</a>
                    </li>
                </ul>
            </div>

            <table class="tab_list">
                <tr>
                    <th style="width: 15%">小区名称</th>
                    <th style="width: 15%">所属区域</th>
                    <th style="width: 15%">发布时间</th>
                    <th style="width: 25%">小区地址</th>
                    <th style="width: 10%">状态</th>
                    <th style="width: 20%">操作</th>
                </tr>
                <volist name="list['list']" id='vo'>
                    <tr>
                        <td>{$vo.title}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.add_time|date='Y-m-d',###}</a></td>
                        <td>{$vo.address}</td>
                        <td class="green">{$status[$vo['status']]}</td>
                        <td class="dn">
                            <a href="{:U('Set/edit_estate',array('id'=>$vo['id']))}">编辑</a><span>|</span>
                            <a href="{:U('Set/del_estate',array('id'=>$vo['id']))}">删除</a><span>|</span>
                            <a href="{:U('set/dict_first',array ('id'=>$vo['id']))}">生成字典</a>
                        <td>
                    </tr>
                </volist>
            </table>
            <div class="page">
                {$list.page}
            </div>
        </div>
    </div>
</div>
<script>
    function generator (id){
        window.location.href = "{:U('set/dict_first')}&id="+id;
        /*layer.confirm('确定生成', {
            btn: ['确定','取消']
        }, function(){
            var index = layer.load(0, {shade: true});
            var url = "{:U('Ajax/generator')}";
            var data = {id:id};
            $.ajax({
                type : "post", url : url, data : data, dataType : 'json',
                async : true,
                success : function(response){
                    if (response.state == 'ok'){
                        layer.closeAll();
                        layer.msg(response.msg, {icon: 1});
                    }else{
                        layer.msg(response.msg, {icon: 0});
                    }
                }
            });
        }, function(){
            layer.msg('已取消', {icon: 0});
        });*/
    }
</script>
<include file="Public:footer" />